package br.ufrn.execicios.jsf.dataServer;

import java.io.Serializable;

import br.ufrn.execicios.jsf.commons.FacesUtil;

@SuppressWarnings("serial")

public abstract class AbstractDataserver implements Serializable{
    private DB db ;
	public AbstractDataserver() {
		init();
	}
	private void init() {
		if (FacesUtil.getApplicationMapValue("db")==null) {
			db = DB.getInstance();
			FacesUtil.setApplicationMapValue("db", db);
		}
		else
			db=(DB)FacesUtil.getApplicationMapValue("db");
	}
	public DB getDb() {
		return db;
	}

}
